<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>General: GDK 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 3 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="reference.html" title="API Reference">
<link rel="next" href="GdkDisplayManager.html" title="GdkDisplayManager">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdk3-General.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="reference.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GdkDisplayManager.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk3-General"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk3-General.top_of_page"></a>General</span></h2>
<p>General — Library initialization and miscellaneous functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gdk3-General.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-init" title="gdk_init ()">gdk_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-init-check" title="gdk_init_check ()">gdk_init_check</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-parse-args" title="gdk_parse_args ()">gdk_parse_args</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-get-display-arg-name" title="gdk_get_display_arg_name ()">gdk_get_display_arg_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-notify-startup-complete" title="gdk_notify_startup_complete ()">gdk_notify_startup_complete</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-notify-startup-complete-with-id" title="gdk_notify_startup_complete_with_id ()">gdk_notify_startup_complete_with_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-set-allowed-backends" title="gdk_set_allowed_backends ()">gdk_set_allowed_backends</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-get-program-class" title="gdk_get_program_class ()">gdk_get_program_class</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-set-program-class" title="gdk_set_program_class ()">gdk_set_program_class</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-get-display" title="gdk_get_display ()">gdk_get_display</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-flush" title="gdk_flush ()">gdk_flush</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-screen-width" title="gdk_screen_width ()">gdk_screen_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-screen-height" title="gdk_screen_height ()">gdk_screen_height</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-screen-width-mm" title="gdk_screen_width_mm ()">gdk_screen_width_mm</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-screen-height-mm" title="gdk_screen_height_mm ()">gdk_screen_height_mm</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus"><span class="returnvalue">GdkGrabStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-pointer-grab" title="gdk_pointer_grab ()">gdk_pointer_grab</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-pointer-ungrab" title="gdk_pointer_ungrab ()">gdk_pointer_ungrab</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-pointer-is-grabbed" title="gdk_pointer_is_grabbed ()">gdk_pointer_is_grabbed</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-set-double-click-time" title="gdk_set_double_click_time ()">gdk_set_double_click_time</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus"><span class="returnvalue">GdkGrabStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-keyboard-grab" title="gdk_keyboard_grab ()">gdk_keyboard_grab</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-keyboard-ungrab" title="gdk_keyboard_ungrab ()">gdk_keyboard_ungrab</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-beep" title="gdk_beep ()">gdk_beep</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-error-trap-push" title="gdk_error_trap_push ()">gdk_error_trap_push</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-error-trap-pop" title="gdk_error_trap_pop ()">gdk_error_trap_pop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-General.html#gdk-error-trap-pop-ignored" title="gdk_error_trap_pop_ignored ()">gdk_error_trap_pop_ignored</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk3-General.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus">GdkGrabStatus</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-WINDOWING-X11:CAPS" title="GDK_WINDOWING_X11">GDK_WINDOWING_X11</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-WINDOWING-WIN32:CAPS" title="GDK_WINDOWING_WIN32">GDK_WINDOWING_WIN32</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-WINDOWING-QUARTZ:CAPS" title="GDK_WINDOWING_QUARTZ">GDK_WINDOWING_QUARTZ</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-WINDOWING-WAYLAND:CAPS" title="GDK_WINDOWING_WAYLAND">GDK_WINDOWING_WAYLAND</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-0:CAPS" title="GDK_VERSION_3_0">GDK_VERSION_3_0</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-2:CAPS" title="GDK_VERSION_3_2">GDK_VERSION_3_2</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-4:CAPS" title="GDK_VERSION_3_4">GDK_VERSION_3_4</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-6:CAPS" title="GDK_VERSION_3_6">GDK_VERSION_3_6</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-8:CAPS" title="GDK_VERSION_3_8">GDK_VERSION_3_8</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-10:CAPS" title="GDK_VERSION_3_10">GDK_VERSION_3_10</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-12:CAPS" title="GDK_VERSION_3_12">GDK_VERSION_3_12</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-3-14:CAPS" title="GDK_VERSION_3_14">GDK_VERSION_3_14</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-MIN-REQUIRED:CAPS" title="GDK_VERSION_MIN_REQUIRED">GDK_VERSION_MIN_REQUIRED</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-VERSION-MAX-ALLOWED:CAPS" title="GDK_VERSION_MAX_ALLOWED">GDK_VERSION_MAX_ALLOWED</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="gdk3-General.html#GDK-DISABLE-DEPRECATION-WARNINGS:CAPS" title="GDK_DISABLE_DEPRECATION_WARNINGS">GDK_DISABLE_DEPRECATION_WARNINGS</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk3-General.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gdk3-General.description"></a><h2>Description</h2>
<p>This section describes the GDK initialization functions and miscellaneous
utility functions, as well as deprecation facilities.</p>
<p>The GDK and GTK+ headers annotate deprecated APIs in a way that produces
compiler warnings if these deprecated APIs are used. The warnings
can be turned off by defining the macro <a class="link" href="gdk3-General.html#GDK-DISABLE-DEPRECATION-WARNINGS:CAPS" title="GDK_DISABLE_DEPRECATION_WARNINGS"><code class="literal">GDK_DISABLE_DEPRECATION_WARNINGS</code></a>
before including the glib.h header.</p>
<p>GDK and GTK+ also provide support for building applications against
defined subsets of deprecated or new APIs. Define the macro
<a class="link" href="gdk3-General.html#GDK-VERSION-MIN-REQUIRED:CAPS" title="GDK_VERSION_MIN_REQUIRED"><code class="literal">GDK_VERSION_MIN_REQUIRED</code></a> to specify up to what version
you want to receive warnings about deprecated APIs. Define the
macro <a class="link" href="gdk3-General.html#GDK-VERSION-MAX-ALLOWED:CAPS" title="GDK_VERSION_MAX_ALLOWED"><code class="literal">GDK_VERSION_MAX_ALLOWED</code></a> to specify the newest version
whose API you want to use.</p>
</div>
<div class="refsect1">
<a name="gdk3-General.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-init"></a><h3>gdk_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_init (<em class="parameter"><code><span class="type">gint</span> *argc</code></em>,
          <em class="parameter"><code><span class="type">gchar</span> ***argv</code></em>);</pre>
<p>Initializes the GDK library and connects to the windowing system.
If initialization fails, a warning message is output and the application
terminates with a call to <code class="literal">exit(1)</code>.</p>
<p>Any arguments used by GDK are removed from the array and <em class="parameter"><code>argc</code></em>
 and <em class="parameter"><code>argv</code></em>

are updated accordingly.</p>
<p>GTK+ initializes GDK in <code class="function">gtk_init()</code> and so this function is not usually
needed by GTK+ applications.</p>
<div class="refsect3">
<a name="gdk-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>argc</p></td>
<td class="parameter_description"><p>the number of command line arguments. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>argv</p></td>
<td class="parameter_description"><p>the array of command line arguments. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc][<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-init-check"></a><h3>gdk_init_check ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_init_check (<em class="parameter"><code><span class="type">gint</span> *argc</code></em>,
                <em class="parameter"><code><span class="type">gchar</span> ***argv</code></em>);</pre>
<p>Initializes the GDK library and connects to the windowing system,
returning <code class="literal">TRUE</code> on success.</p>
<p>Any arguments used by GDK are removed from the array and <em class="parameter"><code>argc</code></em>
 and <em class="parameter"><code>argv</code></em>

are updated accordingly.</p>
<p>GTK+ initializes GDK in <code class="function">gtk_init()</code> and so this function is not usually
needed by GTK+ applications.</p>
<div class="refsect3">
<a name="gdk-init-check.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>argc</p></td>
<td class="parameter_description"><p>the number of command line arguments. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>argv</p></td>
<td class="parameter_description"><p>the array of command line arguments. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc][<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-init-check.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if initialization succeeded.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-parse-args"></a><h3>gdk_parse_args ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_parse_args (<em class="parameter"><code><span class="type">gint</span> *argc</code></em>,
                <em class="parameter"><code><span class="type">gchar</span> ***argv</code></em>);</pre>
<p>Parse command line arguments, and store for future
use by calls to <a class="link" href="GdkDisplay.html#gdk-display-open" title="gdk_display_open ()"><code class="function">gdk_display_open()</code></a>.</p>
<p>Any arguments used by GDK are removed from the array and <em class="parameter"><code>argc</code></em>
 and <em class="parameter"><code>argv</code></em>
 are
updated accordingly.</p>
<p>You shouldn’t call this function explicitly if you are using
<code class="function">gtk_init()</code>, <code class="function">gtk_init_check()</code>, <a class="link" href="gdk3-General.html#gdk-init" title="gdk_init ()"><code class="function">gdk_init()</code></a>, or <a class="link" href="gdk3-General.html#gdk-init-check" title="gdk_init_check ()"><code class="function">gdk_init_check()</code></a>.</p>
<div class="refsect3">
<a name="gdk-parse-args.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>argc</p></td>
<td class="parameter_description"><p>the number of command line arguments.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>argv</p></td>
<td class="parameter_description"><p>the array of command line arguments. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=argc]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-get-display-arg-name"></a><h3>gdk_get_display_arg_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gdk_get_display_arg_name (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the display name specified in the command line arguments passed
to <a class="link" href="gdk3-General.html#gdk-init" title="gdk_init ()"><code class="function">gdk_init()</code></a> or <a class="link" href="gdk3-General.html#gdk-parse-args" title="gdk_parse_args ()"><code class="function">gdk_parse_args()</code></a>, if any.</p>
<div class="refsect3">
<a name="gdk-get-display-arg-name.returns"></a><h4>Returns</h4>
<p>the display name, if specified explicitly,
otherwise <code class="literal">NULL</code> this string is owned by GTK+ and must not be
modified or freed. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-notify-startup-complete"></a><h3>gdk_notify_startup_complete ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_notify_startup_complete (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Indicates to the GUI environment that the application has finished
loading. If the applications opens windows, this function is
normally called after opening the application’s initial set of
windows.</p>
<p>GTK+ will call this function automatically after opening the first
<span class="type">GtkWindow</span> unless <code class="function">gtk_window_set_auto_startup_notification()</code> is called
to disable that feature.</p>
<p class="since">Since: 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-notify-startup-complete-with-id"></a><h3>gdk_notify_startup_complete_with_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_notify_startup_complete_with_id (<em class="parameter"><code>const <span class="type">gchar</span> *startup_id</code></em>);</pre>
<p>Indicates to the GUI environment that the application has
finished loading, using a given identifier.</p>
<p>GTK+ will call this function automatically for <span class="type">GtkWindow</span>
with custom startup-notification identifier unless
<code class="function">gtk_window_set_auto_startup_notification()</code> is called to
disable that feature.</p>
<div class="refsect3">
<a name="gdk-notify-startup-complete-with-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>startup_id</p></td>
<td class="parameter_description"><p>a startup-notification identifier, for which
notification process should be completed</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-set-allowed-backends"></a><h3>gdk_set_allowed_backends ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_set_allowed_backends (<em class="parameter"><code>const <span class="type">gchar</span> *backends</code></em>);</pre>
<p>Sets a list of backends that GDK should try to use.</p>
<p>This can be be useful if your application does not
work with certain GDK backends.</p>
<p>By default, GDK tries all included backends.</p>
<p>For example,</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">gdk_set_allowed_backends</span> <span class="p">(</span><span class="s">&quot;wayland,quartz,*&quot;</span><span class="p">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
instructs GDK to try the Wayland backend first,
followed by the Quartz backend, and then all
others.</p>
<p>If the <code class="literal">GDK_BACKEND</code> environment variable
is set, it determines what backends are tried in what
order, while still respecting the set of allowed backends
that are specified by this function.</p>
<p>The possible backend names are x11, win32, quartz,
broadway, wayland. You can also include a * in the
list to try all remaining backends.</p>
<p>This call must happen prior to <a class="link" href="GdkDisplay.html#gdk-display-open" title="gdk_display_open ()"><code class="function">gdk_display_open()</code></a>,
<code class="function">gtk_init()</code>, <code class="function">gtk_init_with_args()</code> or <code class="function">gtk_init_check()</code>
in order to take effect.</p>
<div class="refsect3">
<a name="gdk-set-allowed-backends.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>backends</p></td>
<td class="parameter_description"><p>a comma-separated list of backends</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-get-program-class"></a><h3>gdk_get_program_class ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gdk_get_program_class (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the program class. Unless the program class has explicitly
been set with <a class="link" href="gdk3-General.html#gdk-set-program-class" title="gdk_set_program_class ()"><code class="function">gdk_set_program_class()</code></a> or with the <code class="literal">--class</code>
commandline option, the default value is the program name (determined
with <code class="function">g_get_prgname()</code>) with the first character converted to uppercase.</p>
<div class="refsect3">
<a name="gdk-get-program-class.returns"></a><h4>Returns</h4>
<p> the program class.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-set-program-class"></a><h3>gdk_set_program_class ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_set_program_class (<em class="parameter"><code>const <span class="type">gchar</span> *program_class</code></em>);</pre>
<p>Sets the program class. The X11 backend uses the program class to set
the class name part of the <code class="literal">WM_CLASS</code> property on
toplevel windows; see the ICCCM.</p>
<p>The program class can still be overridden with the --class command
line option.</p>
<div class="refsect3">
<a name="gdk-set-program-class.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>program_class</p></td>
<td class="parameter_description"><p>a string.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-get-display"></a><h3>gdk_get_display ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gdk_get_display (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_get_display</code> has been deprecated since version 3.8 and should not be used in newly-written code.</p>
<p>Call gdk_display_get_name (<a class="link" href="GdkDisplay.html#gdk-display-get-default" title="gdk_display_get_default ()"><code class="function">gdk_display_get_default()</code></a>))
   instead.</p>
</div>
<p>Gets the name of the display, which usually comes from the
<code class="literal">DISPLAY</code> environment variable or the
<code class="literal">--display</code> command line option.</p>
<div class="refsect3">
<a name="gdk-get-display.returns"></a><h4>Returns</h4>
<p> the name of the display.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-flush"></a><h3>gdk_flush ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_flush (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_flush</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Flushes the output buffers of all display connections and waits
until all requests have been processed.
This is rarely needed by applications.</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-screen-width"></a><h3>gdk_screen_width ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_screen_width (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_screen_width</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Use per-monitor information</p>
</div>
<p>Gets the width of the default screen in pixels. The returned
size is in ”application pixels”, not in ”device pixels” (see
<a class="link" href="GdkScreen.html#gdk-screen-get-monitor-scale-factor" title="gdk_screen_get_monitor_scale_factor ()"><code class="function">gdk_screen_get_monitor_scale_factor()</code></a>).</p>
<div class="refsect3">
<a name="gdk-screen-width.returns"></a><h4>Returns</h4>
<p> the width of the default screen in pixels.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-screen-height"></a><h3>gdk_screen_height ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_screen_height (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_screen_height</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Use per-monitor information</p>
</div>
<p>Gets the height of the default screen in pixels. The returned
size is in ”application pixels”, not in ”device pixels” (see
<a class="link" href="GdkScreen.html#gdk-screen-get-monitor-scale-factor" title="gdk_screen_get_monitor_scale_factor ()"><code class="function">gdk_screen_get_monitor_scale_factor()</code></a>).</p>
<div class="refsect3">
<a name="gdk-screen-height.returns"></a><h4>Returns</h4>
<p> the height of the default screen in pixels.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-screen-width-mm"></a><h3>gdk_screen_width_mm ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_screen_width_mm (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_screen_width_mm</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Use per-monitor information</p>
</div>
<p>Returns the width of the default screen in millimeters.
Note that on many X servers this value will not be correct.</p>
<div class="refsect3">
<a name="gdk-screen-width-mm.returns"></a><h4>Returns</h4>
<p> the width of the default screen in millimeters,
though it is not always correct.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-screen-height-mm"></a><h3>gdk_screen_height_mm ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_screen_height_mm (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_screen_height_mm</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Use per-monitor information</p>
</div>
<p>Returns the height of the default screen in millimeters.
Note that on many X servers this value will not be correct.</p>
<div class="refsect3">
<a name="gdk-screen-height-mm.returns"></a><h4>Returns</h4>
<p> the height of the default screen in millimeters,
though it is not always correct.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pointer-grab"></a><h3>gdk_pointer_grab ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus"><span class="returnvalue">GdkGrabStatus</span></a>
gdk_pointer_grab (<em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                  <em class="parameter"><code><span class="type">gboolean</span> owner_events</code></em>,
                  <em class="parameter"><code><a class="link" href="gdk3-Events.html#GdkEventMask" title="enum GdkEventMask"><span class="type">GdkEventMask</span></a> event_mask</code></em>,
                  <em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *confine_to</code></em>,
                  <em class="parameter"><code><a class="link" href="gdk3-Cursors.html#GdkCursor"><span class="type">GdkCursor</span></a> *cursor</code></em>,
                  <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_pointer_grab</code> has been deprecated since version 3.0 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a> instead.</p>
</div>
<p>Grabs the pointer (usually a mouse) so that all events are passed to this
application until the pointer is ungrabbed with <a class="link" href="gdk3-General.html#gdk-pointer-ungrab" title="gdk_pointer_ungrab ()"><code class="function">gdk_pointer_ungrab()</code></a>, or
the grab window becomes unviewable.
This overrides any previous pointer grab by this client.</p>
<p>Pointer grabs are used for operations which need complete control over mouse
events, even if the mouse leaves the application.
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
the <span class="type">GtkHPaned</span> and <span class="type">GtkVPaned</span> widgets.</p>
<p>Note that if the event mask of an X window has selected both button press and
button release events, then a button press event will cause an automatic
pointer grab until the button is released.
X does this automatically since most applications expect to receive button
press and release events in pairs.
It is equivalent to a pointer grab on the window with <em class="parameter"><code>owner_events</code></em>
 set to
<code class="literal">TRUE</code>.</p>
<p>If you set up anything at the time you take the grab that needs to be cleaned
up when the grab ends, you should handle the <a class="link" href="gdk3-Event-Structures.html#GdkEventGrabBroken" title="struct GdkEventGrabBroken"><span class="type">GdkEventGrabBroken</span></a> events that
are emitted when the grab ends unvoluntarily.</p>
<div class="refsect3">
<a name="gdk-pointer-grab.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> which will own the grab (the grab window).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>owner_events</p></td>
<td class="parameter_description"><p>if <code class="literal">FALSE</code> then all pointer events are reported with respect to
<em class="parameter"><code>window</code></em>
and are only reported if selected by <em class="parameter"><code>event_mask</code></em>
. If <code class="literal">TRUE</code> then pointer
events for this application are reported as normal, but pointer events outside
this application are reported with respect to <em class="parameter"><code>window</code></em>
and only if selected by
<em class="parameter"><code>event_mask</code></em>
. In either mode, unreported events are discarded.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event_mask</p></td>
<td class="parameter_description"><p>specifies the event mask, which is used in accordance with
<em class="parameter"><code>owner_events</code></em>
. Note that only pointer events (i.e. button and motion events)
may be selected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>confine_to</p></td>
<td class="parameter_description"><p>If non-<code class="literal">NULL</code>, the pointer will be confined to this
window during the grab. If the pointer is outside <em class="parameter"><code>confine_to</code></em>
, it will
automatically be moved to the closest edge of <em class="parameter"><code>confine_to</code></em>
and enter
and leave events will be generated as necessary. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>cursor</p></td>
<td class="parameter_description"><p>the cursor to display while the grab is active. If this is <code class="literal">NULL</code> then
the normal cursors are used for <em class="parameter"><code>window</code></em>
and its descendants, and the cursor
for <em class="parameter"><code>window</code></em>
is used for all other windows. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>time_</p></td>
<td class="parameter_description"><p>the timestamp of the event which led to this pointer grab. This usually
comes from a <a class="link" href="gdk3-Event-Structures.html#GdkEventButton" title="struct GdkEventButton"><span class="type">GdkEventButton</span></a> struct, though <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><code class="literal">GDK_CURRENT_TIME</code></a> can be used if
the time isn’t known.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-pointer-grab.returns"></a><h4>Returns</h4>
<p> <a class="link" href="gdk3-General.html#GDK-GRAB-SUCCESS:CAPS"><code class="literal">GDK_GRAB_SUCCESS</code></a> if the grab was successful.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pointer-ungrab"></a><h3>gdk_pointer_ungrab ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_pointer_ungrab (<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_pointer_ungrab</code> has been deprecated since version 3.0 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkDevice.html#gdk-device-ungrab" title="gdk_device_ungrab ()"><code class="function">gdk_device_ungrab()</code></a>, together with <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>
            instead.</p>
</div>
<p>Ungrabs the pointer on the default display, if it is grabbed by this 
application.</p>
<div class="refsect3">
<a name="gdk-pointer-ungrab.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>time_</p></td>
<td class="parameter_description"><p>a timestamp from a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, or <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><code class="literal">GDK_CURRENT_TIME</code></a> if no
timestamp is available.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pointer-is-grabbed"></a><h3>gdk_pointer_is_grabbed ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gdk_pointer_is_grabbed (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_pointer_is_grabbed</code> has been deprecated since version 3.0 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkDisplay.html#gdk-display-device-is-grabbed" title="gdk_display_device_is_grabbed ()"><code class="function">gdk_display_device_is_grabbed()</code></a> instead.</p>
</div>
<p>Returns <code class="literal">TRUE</code> if the pointer on the default display is currently 
grabbed by this application.</p>
<p>Note that this does not take the inmplicit pointer grab on button
presses into account.</p>
<div class="refsect3">
<a name="gdk-pointer-is-grabbed.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the pointer is currently grabbed by this application.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-set-double-click-time"></a><h3>gdk_set_double_click_time ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_set_double_click_time (<em class="parameter"><code><span class="type">guint</span> msec</code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_set_double_click_time</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Set the double click time for the default display. See
<a class="link" href="GdkDisplay.html#gdk-display-set-double-click-time" title="gdk_display_set_double_click_time ()"><code class="function">gdk_display_set_double_click_time()</code></a>. 
See also <a class="link" href="GdkDisplay.html#gdk-display-set-double-click-distance" title="gdk_display_set_double_click_distance ()"><code class="function">gdk_display_set_double_click_distance()</code></a>.
Applications should not set this, it is a 
global user-configured setting.</p>
<div class="refsect3">
<a name="gdk-set-double-click-time.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>msec</p></td>
<td class="parameter_description"><p>double click time in milliseconds (thousandths of a second)</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-keyboard-grab"></a><h3>gdk_keyboard_grab ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-General.html#GdkGrabStatus" title="enum GdkGrabStatus"><span class="returnvalue">GdkGrabStatus</span></a>
gdk_keyboard_grab (<em class="parameter"><code><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *window</code></em>,
                   <em class="parameter"><code><span class="type">gboolean</span> owner_events</code></em>,
                   <em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_keyboard_grab</code> has been deprecated since version 3.0 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a> instead.</p>
</div>
<p>Grabs the keyboard so that all events are passed to this
application until the keyboard is ungrabbed with <a class="link" href="gdk3-General.html#gdk-keyboard-ungrab" title="gdk_keyboard_ungrab ()"><code class="function">gdk_keyboard_ungrab()</code></a>.
This overrides any previous keyboard grab by this client.</p>
<p>If you set up anything at the time you take the grab that needs to be cleaned
up when the grab ends, you should handle the <a class="link" href="gdk3-Event-Structures.html#GdkEventGrabBroken" title="struct GdkEventGrabBroken"><span class="type">GdkEventGrabBroken</span></a> events that
are emitted when the grab ends unvoluntarily.</p>
<div class="refsect3">
<a name="gdk-keyboard-grab.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>window</p></td>
<td class="parameter_description"><p>the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> which will own the grab (the grab window).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>owner_events</p></td>
<td class="parameter_description"><p>if <code class="literal">FALSE</code> then all keyboard events are reported with respect to
<em class="parameter"><code>window</code></em>
. If <code class="literal">TRUE</code> then keyboard events for this application are
reported as normal, but keyboard events outside this application
are reported with respect to <em class="parameter"><code>window</code></em>
. Both key press and key
release events are always reported, independant of the event mask
set by the application.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>time_</p></td>
<td class="parameter_description"><p>a timestamp from a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, or <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><code class="literal">GDK_CURRENT_TIME</code></a> if no timestamp is
available.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-keyboard-grab.returns"></a><h4>Returns</h4>
<p> <a class="link" href="gdk3-General.html#GDK-GRAB-SUCCESS:CAPS"><code class="literal">GDK_GRAB_SUCCESS</code></a> if the grab was successful.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-keyboard-ungrab"></a><h3>gdk_keyboard_ungrab ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_keyboard_ungrab (<em class="parameter"><code><span class="type">guint32</span> time_</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_keyboard_ungrab</code> has been deprecated since version 3.0 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkDevice.html#gdk-device-ungrab" title="gdk_device_ungrab ()"><code class="function">gdk_device_ungrab()</code></a>, together with <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>
            instead.</p>
</div>
<p>Ungrabs the keyboard on the default display, if it is grabbed by this 
application.</p>
<div class="refsect3">
<a name="gdk-keyboard-ungrab.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>time_</p></td>
<td class="parameter_description"><p>a timestamp from a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>, or <a class="link" href="gdk3-Events.html#GDK-CURRENT-TIME:CAPS" title="GDK_CURRENT_TIME"><code class="literal">GDK_CURRENT_TIME</code></a> if no
timestamp is available.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-beep"></a><h3>gdk_beep ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_beep (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_beep</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Emits a short beep on the default display.</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-error-trap-push"></a><h3>gdk_error_trap_push ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_error_trap_push (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_error_trap_push</code> is deprecated and should not be used in newly-written code.</p></div>
<p>This function allows X errors to be trapped instead of the normal
behavior of exiting the application. It should only be used if it
is not possible to avoid the X error in any other way. Errors are
ignored on all <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> currently known to the
<a class="link" href="GdkDisplayManager.html" title="GdkDisplayManager"><span class="type">GdkDisplayManager</span></a>. If you don’t care which error happens and just
want to ignore everything, pop with <a class="link" href="gdk3-General.html#gdk-error-trap-pop-ignored" title="gdk_error_trap_pop_ignored ()"><code class="function">gdk_error_trap_pop_ignored()</code></a>.
If you need the error code, use <a class="link" href="gdk3-General.html#gdk-error-trap-pop" title="gdk_error_trap_pop ()"><code class="function">gdk_error_trap_pop()</code></a> which may have
to block and wait for the error to arrive from the X server.</p>
<p>This API exists on all platforms but only does anything on X.</p>
<p>You can use <a class="link" href="gdk3-X-Window-System-Interaction.html#gdk-x11-display-error-trap-push" title="gdk_x11_display_error_trap_push ()"><code class="function">gdk_x11_display_error_trap_push()</code></a> to ignore errors
on only a single display.</p>
<div class="refsect3">
<a name="id-1.2.2.7.24.8"></a><h4>Trapping an X error</h4>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">gdk_error_trap_push</span> <span class="p">();</span>

 <span class="c1">// ... Call the X function which may cause an error here ...</span>


<span class="k">if</span> <span class="p">(</span><span class="n">gdk_error_trap_pop</span> <span class="p">())</span>
 <span class="p">{</span>
   <span class="c1">// ... Handle the error here ...</span>
 <span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-error-trap-pop"></a><h3>gdk_error_trap_pop ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_error_trap_pop (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_error_trap_pop</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Removes an error trap pushed with <a class="link" href="gdk3-General.html#gdk-error-trap-push" title="gdk_error_trap_push ()"><code class="function">gdk_error_trap_push()</code></a>.
May block until an error has been definitively received
or not received from the X server. <a class="link" href="gdk3-General.html#gdk-error-trap-pop-ignored" title="gdk_error_trap_pop_ignored ()"><code class="function">gdk_error_trap_pop_ignored()</code></a>
is preferred if you don’t need to know whether an error
occurred, because it never has to block. If you don't
need the return value of <a class="link" href="gdk3-General.html#gdk-error-trap-pop" title="gdk_error_trap_pop ()"><code class="function">gdk_error_trap_pop()</code></a>, use
<a class="link" href="gdk3-General.html#gdk-error-trap-pop-ignored" title="gdk_error_trap_pop_ignored ()"><code class="function">gdk_error_trap_pop_ignored()</code></a>.</p>
<p>Prior to GDK 3.0, this function would not automatically
sync for you, so you had to <a class="link" href="gdk3-General.html#gdk-flush" title="gdk_flush ()"><code class="function">gdk_flush()</code></a> if your last
call to Xlib was not a blocking round trip.</p>
<div class="refsect3">
<a name="gdk-error-trap-pop.returns"></a><h4>Returns</h4>
<p> X error code or 0 on success</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-error-trap-pop-ignored"></a><h3>gdk_error_trap_pop_ignored ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_error_trap_pop_ignored (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">gdk_error_trap_pop_ignored</code> is deprecated and should not be used in newly-written code.</p></div>
<p>Removes an error trap pushed with <a class="link" href="gdk3-General.html#gdk-error-trap-push" title="gdk_error_trap_push ()"><code class="function">gdk_error_trap_push()</code></a>, but
without bothering to wait and see whether an error occurred.  If an
error arrives later asynchronously that was triggered while the
trap was pushed, that error will be ignored.</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="gdk3-General.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkGrabStatus"></a><h3>enum GdkGrabStatus</h3>
<p>Returned by <a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a>, <a class="link" href="gdk3-General.html#gdk-pointer-grab" title="gdk_pointer_grab ()"><code class="function">gdk_pointer_grab()</code></a> and <a class="link" href="gdk3-General.html#gdk-keyboard-grab" title="gdk_keyboard_grab ()"><code class="function">gdk_keyboard_grab()</code></a> to
indicate success or the reason for the failure of the grab attempt.</p>
<div class="refsect3">
<a name="GdkGrabStatus.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-GRAB-SUCCESS:CAPS"></a>GDK_GRAB_SUCCESS</p></td>
<td class="enum_member_description">
<p>the resource was successfully grabbed.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-GRAB-ALREADY-GRABBED:CAPS"></a>GDK_GRAB_ALREADY_GRABBED</p></td>
<td class="enum_member_description">
<p>the resource is actively grabbed by another client.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-GRAB-INVALID-TIME:CAPS"></a>GDK_GRAB_INVALID_TIME</p></td>
<td class="enum_member_description">
<p>the resource was grabbed more recently than the
specified time.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-GRAB-NOT-VIEWABLE:CAPS"></a>GDK_GRAB_NOT_VIEWABLE</p></td>
<td class="enum_member_description">
<p>the grab window or the <em class="parameter"><code>confine_to</code></em>
 window are not
viewable.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-GRAB-FROZEN:CAPS"></a>GDK_GRAB_FROZEN</p></td>
<td class="enum_member_description">
<p>the resource is frozen by an active grab of another client.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-GRAB-FAILED:CAPS"></a>GDK_GRAB_FAILED</p></td>
<td class="enum_member_description">
<p>the grab failed for some other reason. Since 3.16</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GDK-WINDOWING-X11:CAPS"></a><h3>GDK_WINDOWING_X11</h3>
<pre class="programlisting">#define GDK_WINDOWING_X11
</pre>
<p>The <a class="link" href="gdk3-General.html#GDK-WINDOWING-X11:CAPS" title="GDK_WINDOWING_X11"><span class="type">GDK_WINDOWING_X11</span></a> macro is defined if the X11 backend
is supported.</p>
<p>Use this macro to guard code that is specific to the X11 backend.</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-WINDOWING-WIN32:CAPS"></a><h3>GDK_WINDOWING_WIN32</h3>
<pre class="programlisting">#define GDK_WINDOWING_WIN32
</pre>
<p>The <a class="link" href="gdk3-General.html#GDK-WINDOWING-WIN32:CAPS" title="GDK_WINDOWING_WIN32"><span class="type">GDK_WINDOWING_WIN32</span></a> macro is defined if the Win32 backend
is supported.</p>
<p>Use this macro to guard code that is specific to the Win32 backend.</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-WINDOWING-QUARTZ:CAPS"></a><h3>GDK_WINDOWING_QUARTZ</h3>
<pre class="programlisting">#define GDK_WINDOWING_QUARTZ
</pre>
<p>The <a class="link" href="gdk3-General.html#GDK-WINDOWING-QUARTZ:CAPS" title="GDK_WINDOWING_QUARTZ"><span class="type">GDK_WINDOWING_QUARTZ</span></a> macro is defined if the Quartz backend
is supported.</p>
<p>Use this macro to guard code that is specific to the Quartz backend.</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-WINDOWING-WAYLAND:CAPS"></a><h3>GDK_WINDOWING_WAYLAND</h3>
<pre class="programlisting">#define GDK_WINDOWING_WAYLAND
</pre>
<p>The <a class="link" href="gdk3-General.html#GDK-WINDOWING-WAYLAND:CAPS" title="GDK_WINDOWING_WAYLAND"><span class="type">GDK_WINDOWING_WAYLAND</span></a> macro is defined if the Wayland backend
is supported.</p>
<p>Use this macro to guard code that is specific to the Wayland backend.</p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-0:CAPS"></a><h3>GDK_VERSION_3_0</h3>
<pre class="programlisting">#define GDK_VERSION_3_0         (G_ENCODE_VERSION (3, 0))
</pre>
<p>A macro that evaluates to the 3.0 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-4.html#api-index-3.4">3.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-2:CAPS"></a><h3>GDK_VERSION_3_2</h3>
<pre class="programlisting">#define GDK_VERSION_3_2         (G_ENCODE_VERSION (3, 2))
</pre>
<p>A macro that evaluates to the 3.2 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-4.html#api-index-3.4">3.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-4:CAPS"></a><h3>GDK_VERSION_3_4</h3>
<pre class="programlisting">#define GDK_VERSION_3_4         (G_ENCODE_VERSION (3, 4))
</pre>
<p>A macro that evaluates to the 3.4 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-4.html#api-index-3.4">3.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-6:CAPS"></a><h3>GDK_VERSION_3_6</h3>
<pre class="programlisting">#define GDK_VERSION_3_6         (G_ENCODE_VERSION (3, 6))
</pre>
<p>A macro that evaluates to the 3.6 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-6.html#api-index-3.6">3.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-8:CAPS"></a><h3>GDK_VERSION_3_8</h3>
<pre class="programlisting">#define GDK_VERSION_3_8         (G_ENCODE_VERSION (3, 8))
</pre>
<p>A macro that evaluates to the 3.8 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-8.html#api-index-3.8">3.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-10:CAPS"></a><h3>GDK_VERSION_3_10</h3>
<pre class="programlisting">#define GDK_VERSION_3_10        (G_ENCODE_VERSION (3, 10))
</pre>
<p>A macro that evaluates to the 3.10 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-12:CAPS"></a><h3>GDK_VERSION_3_12</h3>
<pre class="programlisting">#define GDK_VERSION_3_12        (G_ENCODE_VERSION (3, 12))
</pre>
<p>A macro that evaluates to the 3.12 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-12.html#api-index-3.12">3.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-3-14:CAPS"></a><h3>GDK_VERSION_3_14</h3>
<pre class="programlisting">#define GDK_VERSION_3_14        (G_ENCODE_VERSION (3, 14))
</pre>
<p>A macro that evaluates to the 3.14 version of GDK, in a format
that can be used by the C pre-processor.</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-MIN-REQUIRED:CAPS"></a><h3>GDK_VERSION_MIN_REQUIRED</h3>
<pre class="programlisting"># define GDK_VERSION_MIN_REQUIRED      (GDK_VERSION_CUR_STABLE)
</pre>
<p>A macro that should be defined by the user prior to including
the gdk.h header.
The definition should be one of the predefined GDK version
macros: <a class="link" href="gdk3-General.html#GDK-VERSION-3-0:CAPS" title="GDK_VERSION_3_0"><code class="literal">GDK_VERSION_3_0</code></a>, <a class="link" href="gdk3-General.html#GDK-VERSION-3-2:CAPS" title="GDK_VERSION_3_2"><code class="literal">GDK_VERSION_3_2</code></a>,...</p>
<p>This macro defines the lower bound for the GDK API to use.</p>
<p>If a function has been deprecated in a newer version of GDK,
it is possible to use this symbol to avoid the compiler warnings
without disabling warning for every deprecated function.</p>
<p class="since">Since: <a class="link" href="api-index-3-4.html#api-index-3.4">3.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-VERSION-MAX-ALLOWED:CAPS"></a><h3>GDK_VERSION_MAX_ALLOWED</h3>
<pre class="programlisting">#  define GDK_VERSION_MAX_ALLOWED      GDK_VERSION_MIN_REQUIRED
</pre>
<p>A macro that should be defined by the user prior to including
the gdk.h header.
The definition should be one of the predefined GDK version
macros: <a class="link" href="gdk3-General.html#GDK-VERSION-3-0:CAPS" title="GDK_VERSION_3_0"><code class="literal">GDK_VERSION_3_0</code></a>, <a class="link" href="gdk3-General.html#GDK-VERSION-3-2:CAPS" title="GDK_VERSION_3_2"><code class="literal">GDK_VERSION_3_2</code></a>,...</p>
<p>This macro defines the upper bound for the GDK API to use.</p>
<p>If a function has been introduced in a newer version of GDK,
it is possible to use this symbol to get compiler warnings when
trying to use that function.</p>
<p class="since">Since: <a class="link" href="api-index-3-4.html#api-index-3.4">3.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDK-DISABLE-DEPRECATION-WARNINGS:CAPS"></a><h3>GDK_DISABLE_DEPRECATION_WARNINGS</h3>
<pre class="programlisting">#define GDK_DISABLE_DEPRECATION_WARNINGS
</pre>
<p>A macro that should be defined before including the gdk.h header.
If it is defined, no compiler warnings will be produced for uses
of deprecated GDK and GTK+ APIs.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>